#ifndef _I_DEVICE_H
#define _I_DEVICE_H

#include "IPlugin.h"

class IBuffer : public IPlugin {
public:
   virtual ~IBuffer(){}
   virtual void *content() = 0;
   virtual int size() = 0;
   virtual int copacity() = 0;
   virtual void resize(int size) = 0;
};



class IDevice : public IPlugin {
public:
    virtual bool init() = 0;
    virtual bool start() = 0;
    virtual bool stop() = 0;
    virtual bool destroy() = 0;
    virtual void bind(IDevice *target) = 0;
    virtual IBuffer *get() = 0;
    virtual void put(IBuffer *buf) = 0;
};



#endif // _I_DEVICE_H